package com.chasekernan.hxnova.serverui;

//importing used component classes
import org.aswing.JPanel;
import org.aswing.JMenuBar;
import org.aswing.JMenu;
import org.aswing.JMenuItem;
import org.aswing.JLoadPane;
//importing aswing geom classes
import org.aswing.geom.IntDimension;
import org.aswing.geom.IntPoint;
import org.aswing.geom.IntRectangle;
//importing aswing layout classes
import org.aswing.EmptyLayout;
import org.aswing.CenterLayout;
import org.aswing.FlowLayout;
import org.aswing.FlowWrapLayout;
import org.aswing.BorderLayout;
import org.aswing.SoftBoxLayout;
import org.aswing.BoxLayout;
import org.aswing.GridLayout;
//importing aswing border classes
import org.aswing.border.EmptyBorder;
import org.aswing.border.LineBorder;
import org.aswing.border.BevelBorder;
import org.aswing.border.SideLineBorder;
import org.aswing.border.TitledBorder;
import org.aswing.border.SimpleTitledBorder;
import org.aswing.border.CaveBorder;
//importing some additional classes
import org.aswing.ASColor;
import org.aswing.ASWingConstants;

/**
 * ServerUI
 */
class ServerUI extends JPanel{
	
	//members define
	private var menu:JMenuBar;
	private var fileMenu:JMenu;
	private var newGameButton:JMenuItem;
	private var openGameButton:JMenuItem;
	private var exitButton:JMenuItem;
	private var menu9:JMenu;
	private var loadSettingsButton:JMenuItem;
	private var loadComponentsButton:JMenuItem;
	private var backgroundImage:JLoadPane;
	
	/**
	 * ServerUI Constructor
	 */
	public function new(){
		super();
		//component creation
		setLocation(new IntPoint(44, 164));
		setSize(new IntDimension(600, 400));
		var layout1:EmptyLayout = new EmptyLayout();
		setLayout(layout1);
		
		menu = new JMenuBar();
		menu.setLocation(new IntPoint(0, 0));
		menu.setSize(new IntDimension(599, 20));
		
		fileMenu = new JMenu();
		fileMenu.setSize(new IntDimension(29, 20));
		fileMenu.setText("File");
		
		newGameButton = new JMenuItem();
		newGameButton.setText("New Game");
		
		openGameButton = new JMenuItem();
		openGameButton.setText("Open Game");
		
		exitButton = new JMenuItem();
		exitButton.setText("Exit");
		
		menu9 = new JMenu();
		menu9.setLocation(new IntPoint(29, 0));
		menu9.setSize(new IntDimension(51, 20));
		menu9.setText("Settings");
		
		loadSettingsButton = new JMenuItem();
		loadSettingsButton.setLocation(new IntPoint(2, 2));
		loadSettingsButton.setSize(new IntDimension(135, 17));
		loadSettingsButton.setText("Load Game Settings");
		
		loadComponentsButton = new JMenuItem();
		loadComponentsButton.setLocation(new IntPoint(2, 19));
		loadComponentsButton.setSize(new IntDimension(135, 17));
		loadComponentsButton.setText("Load Components");
		
		backgroundImage = new JLoadPane();
		backgroundImage.setLocation(new IntPoint(5, 25));
		backgroundImage.setSize(new IntDimension(590, 370));
		backgroundImage.setScaleMode(2);
		
		//component layoution
		append(menu);
		append(backgroundImage);
		
		menu.append(fileMenu);
		menu.append(menu9);
		
		fileMenu.append(newGameButton);
		fileMenu.append(openGameButton);
		fileMenu.append(exitButton);
		
		menu9.append(loadSettingsButton);
		menu9.append(loadComponentsButton);
		
	}
	
	//_________getters_________
	
	public function getMenu():JMenuBar{
		return menu;
	}
	
	public function getFileMenu():JMenu{
		return fileMenu;
	}
	
	public function getNewGameButton():JMenuItem{
		return newGameButton;
	}
	
	public function getOpenGameButton():JMenuItem{
		return openGameButton;
	}
	
	public function getExitButton():JMenuItem{
		return exitButton;
	}
	
	public function getMenu9():JMenu{
		return menu9;
	}
	
	public function getLoadSettingsButton():JMenuItem{
		return loadSettingsButton;
	}
	
	public function getLoadComponentsButton():JMenuItem{
		return loadComponentsButton;
	}
	
	public function getBackgroundImage():JLoadPane{
		return backgroundImage;
	}
	
	
}
